import request from '../utils/request'
export interface buyNavItemData{
    id: number,
    picUrl: string
    mainTitle: string,
    viceTitle: string,
    columnUrl: string
    onlineType: false,
    vaildStartTime: number,
    vaildEndTime: number,
    rank: number
   
}
interface DataInterface{
    checkNavType:boolean,
    navList:buyNavItemData[]
}
interface BuyData {
   code:string,
    data:DataInterface
}

export interface LookPicsData{
    picUrl: string
    isVideo: boolean,
    videoUrl: string,
    size: number,
    duration:number,
    tagInfo: string,
    height: number,
    width: number
}
export interface TopicsData{
    schemeUrl: string,
        title:string,
        topicId: number,
        nickname: string,
        avatar: string,
        content: string,
        lookPics?: LookPicsData[],
        readCount: number|string,
        appBanHeight: number,
        appBanWidth: number,
        picUrl:string
        newAppBannerWidth?: number,
        newAppBannerHeight?: number,
        newAppBanner?:string

}
export interface FallsListData{
    look:TopicsData,
    topics:TopicsData[]
}
export interface FallsData{
    result:FallsListData[],
    hasMore?:boolean,
    extra?:null
}



export default{
    getInitBuyData(){
        return request.get<any,BuyData>('/topic/v1/know/navWap.json')
    },
    getInitBuyFalls(page:number,size:number){
        return request.get<FallsData>(`/topic/v1/find/recAuto.json?page=${page}&size=${size}`)
    }
}
